function onlyNumbersPointDano(evt)
{
	var keyPressed = (evt.which) ? evt.which : event.keyCode
			return !(keyPressed > 31 && (keyPressed < 48 || keyPressed > 57) && keyPressed != 46 );
}
function onlyNumbersDano(evt)
{
	var keyPressed = (evt.which) ? evt.which : event.keyCode
			return !(keyPressed > 31 && (keyPressed < 48 || keyPressed > 57));
}

function categorySubmit() {
	$("#categoryList").change(function() {
	    $("#catSelect").submit();
	});
}

function hideDirection() {
	if ($("#orderParameters option:selected").text() == "None") {
		$("#direction").css({visibility: "hidden"});
	} else {
		$("#direction").css({visibility: "visible"});
	}
	$("#orderParameters").change(function () {
		if ($("#orderParameters option:selected").text() == "None") {
			$("#direction").css({visibility: "hidden"});
		} else {
			$("#direction").css({visibility: "visible"});
		}
	});
}

function hideCalification() {
	if ($("#confirmation option:selected").text() == "Not yet confirmed") {
		$("#calification").css({visibility: "hidden"});
		$("#calificationlbl").css({visibility: "hidden"});
	} else {
		$("#calification").css({visibility: "visible"});
		$("#calification").css({visibility: "visible"});
	}
	$("#confirmation").change(function () {
		if ($("#confirmation option:selected").text() == "Not yet confirmed") {
			$("#calification").css({visibility: "hidden"});
			$("#calificationlbl").css({visibility: "hidden"});
		} else {
			$("#calification").css({visibility: "visible"});
			$("#calificationlbl").css({visibility: "visible"});
		}
	});
}

function datePicker() {
	$(function() {
		$( ".datepicker" ).datepicker({ dateFormat: "dd/mm/yy"});
	});
}